﻿using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Reflection;
using IDAL;
using Model;

namespace BLL
{
    public class ProductType_Step : BaseService<ProductType_StepInfo>
    {
        private static readonly IProductType_Step dal = DALFactory.DataAccess.CreateProductType_Step();

        public override void SetCurrentRepository()
        {
            CurrentRepository = dal;
        }

        public IList<ProductType_StepInfo> GetStepbyPID(string productTypeID)
        {
            if (!string.IsNullOrEmpty(productTypeID))
                return dal.GetStepbyPID(productTypeID);
            return null;
        }

        public ProductType_StepInfo GetStepbyPIDItem(string productTypeID, string stepItem)
        {
            return dal.GetStepbyPIDItem(productTypeID, stepItem);
        }

        public bool ProductType_Step_HasValidSourceStep(string productSN, string productTypeID, string stepItem)
        {
            return dal.ProductType_Step_HasValidSourceStep(productSN, productTypeID, stepItem);
        }
    }
}
